RiverSync
SPEC-DDD-BIL · v0.2
28 June 2026
Owner: Platform team

Billing — the invoicing bounded context

The money ledger: one billing profile per organization — currency and method — and the invoice lifecycle from issued through due, overdue and paid. THB for the reference organizations; the currency always comes from the profile, never assumed. A generic subdomain — a commodity capability, a candidate to buy.

DraftGeneric subdomainProfiles · invoices
Drill-down of the master domain architecture. Requirements: SPEC-APP-ACC (ACC-3) + SPEC-APP-ADM (ADM-3). Boundaries, routes and events render from domain/domain-catalog.js — definitions are never copied per document.

1Ownership & boundaries

Billing owns the profile and the invoice — nothing about pricing (Tenancy's plans) or deal value (Sales). Won-deal drafts arrive by event; RiverSync accounting issues and reconciles. Partner visibility into agreement-related invoices is a scope switch on the Coverage grant, resolved like every other partner read.

Reads from: Tenancy (organization, currency at bootstrap) · Sales (won deals to invoice). Account is the customer surface; Admin the RiverSync one.

2Ubiquitous language

The words this context uses — the same in code, conversation and spec.

3Aggregates & invariants

The consistency boundaries — one root each, guarding its invariants in a single transaction; cross-aggregate ties are by identity.

4Context relationships

How this context meets its neighbours — downstream customer/supplier of Sales (won deals to invoice) and Federation (profile bootstrap).

5Physical view — the service API

The deployment mapping: this context becomes the Billing service. Paths relative to api.riversync.com/v1; access notation per the master.

RiverSync Co., Ltd. · BangkokSPEC-DDD-BIL · 1 of 2

6Domain events

The past-tense facts this context publishes (and consumes) — its share of the platform's published language.

7Invariants in play

The modeling rules that bind this context — the master holds the full set; data integrity stays with the ERD drill-downs.

8Revision history

VersionDateChanges
0.112 Jun 2026First draft — split proposed with SPEC-DDD v0.1
0.228 Jun 2026Reframed as a Domain-Driven Design context (with the set, SPEC-DDD v0.14) — leads with ubiquitous language & aggregates (BillingProfile, Invoice) and the context relationships (customer/supplier downstream of Sales). Classified a generic subdomain; the API is demoted to the physical view. No ownership change.
RiverSync Co., Ltd. · BangkokSPEC-DDD-BIL · 2 of 2